import yaml
from pathlib import Path


def yaml_file_to_dict(file_path):
    with open(file_path, 'r', encoding='utf8') as fp:
        res = yaml.safe_load(fp)
        return res


if __name__ == '__main__':
    file_path = Path(__file__).parent.parent.joinpath('data', 'test_date.yml')
    print(file_path)
    res1 = yaml_file_to_dict(file_path)
    print(res1)